<?php
 $array_list = array();
 
if (is_array($listDetalle)){
     foreach ($listDetalle as $row){
            $array_list[] = array(
                    "featureId"       => $row->getId(),
                    "featureValue"    =>  $row->getDescripcion(),
                    "unitMeasurement" =>  $row->getCodigoUnidadMedia()
            );
        }
 }
  
 $json  =  json_encode(array(
                   "success"           =>  $head,
                   "packetId"          =>  $paquete->getId(),
                   "packetTitle"       =>  $paquete->getTitulo(),
                   "packetDescription" =>  $paquete->getDescripcion(),
                   "packetDetail"      => array(
				"detail" => $array_list
			)
           ));
  echo $json;
?>